import request from '@/utils/request'
const baseUrl = '/cz-rentbox/api/v1/salePackingListDetails' //租箱服务-- 售箱提箱记录
// import { getPackingDetail } from '@/api/boxDeal/tiXiangManageDetail'
// :根据订单Id获取提提箱记录
export const saleBoxList = (data: any) => {
  return request({
    url: baseUrl+'/'+data+'/saleBoxList',
    method: 'GET'
  })
}
/*
# 买箱公司: 查询提箱记录分页列表
# POST {{baseUrl}}/salePackingListDetails/buyBoxPage
# 过滤条件：提箱单Id:packingId 提箱单号:packingNo  集装箱箱型：boxType 5 - 40HQ   10 - 40GP  15 - 20HQ   20 - 20GP 
# 集装箱箱况：boxCondition 5-全新   10-次新  15-适货  集装箱箱号:containerNo
# 提箱日期时间区间:  beginPackingDate  endPackingDate
# 卖箱公司Id:companyId  卖箱公司名称:companyName 
*/
export const buyBoxPage = (data: any) => {
return request({
url: baseUrl+'/buyBoxPage',
method: 'POST',
data: data
// data:{
//     "packingNo":"ZLOID2024062041957343",
//     "pageNum": 1,
//     "pageSize": 10
// }
})
}

/*
# 集装箱公司: 查询提箱记录分页列表
# POST {{baseUrl}}/salePackingListDetails/saleBoxPage
# 过滤条件：提箱单Id:packingId 提箱单号:packingNo  集装箱箱型：boxType 5 - 40HQ   10 - 40GP  15 - 20HQ   20 - 20GP 
# 集装箱箱况：boxCondition 5-全新   10-次新  15-适货  集装箱箱号:containerNo
# 提箱日期时间区间:  beginPackingDate  endPackingDate
# 买箱公司Id:buyBoxCompanyId  买箱公司名称:buyBoxCompanyName
*/
export const saleBoxPage = (data: any) => {
return request({
url: baseUrl+'/saleBoxPage',
method: 'POST',
data: data
// data:{
//     "packingNo":"ZLOID2024062041957343",
//     "pageNum": 1,
//     "pageSize": 10
// }
})
}

/*
# 根据id查询提箱记录详情
# GET {{baseUrl}}/salePackingListDetails/{id}
*/
export const getPackingDetail = (id: any) => { 
  return request({
    url: baseUrl+'/'+id,
    method: 'get',  
  })
}

/*
# 新增提箱记录
# POST {{baseUrl}}/salePackingListDetails
*/
export const addPackingDetail = (data: any) => {
return request({
url: baseUrl,
method: 'post',
data: data
// data:{
//     "packingId":"123345566",
//     "containerNo":"122343445",
//     "driverInfo":"sdddsdsd",
//     "packingDate":"2024-06-17T10:44:57"
// }
})
}

/*
# ### 删除提箱记录
# DELETE  {{baseUrl}}/salePackingListDetails/{id}
*/
export const deletePackingDetail = (id: any) => { 
  return request({
    url: baseUrl+'/'+id,
    method: 'DELETE'
  })
}

/*
# 卖箱提箱记录:导出Excel文件
# POST  {{baseUrl}}/salePackingListDetails/exportSaleBoxPackingListDetail
*/
export const exportSaleBoxPackingListDetail = (data: any) => {
return request({
  responseType: 'blob',
  url: baseUrl+'/exportSaleBoxPackingListDetail',
  method: 'post',
  data: data
  // data:{
  //    "packingListDetailIds": [
  //         1,2
  //     ]
  // }
  })
}

/*
# 买箱提箱记录:导出Excel文件
# POST  {{baseUrl}}/salePackingListDetails/exportBuyBoxPackingListDetail
*/
export const exportBuyBoxPackingListDetail = (data: any) => {
return request({
  responseType: 'blob',
  url: baseUrl+'/exportBuyBoxPackingListDetail',
  method: 'post',
  data: data
  // data:{
  //    "packingListDetailIds": [
  //         1,2
  //     ]
  // }
  })
}